import os from 'os'

export default function getRemoteIp() {
    const networkInterfaces = os.networkInterfaces()
    for (const name in networkInterfaces) {
        const networkInterface = networkInterfaces[name]
        for (const address of networkInterface) {
            if (address.family === 'IPv4') {
                if (address.address.startsWith('192.168.')) {
                    return address.address
                }
            }
        }
    }
}
